package gdou.gym.exception;

public class SysException extends RuntimeException {

    private static final long serialVersionUID = -1328823202463742691L;
    private final StateCode stateCode;

    public SysException(StateCode stateCode) {
        this.stateCode = stateCode;
    }

    public StateCode getStateCode() {
        return stateCode;
    }

    public void printError() {
        System.out.println("异常代码：" + stateCode.getCode() + ",异常信息：" + stateCode.getCode());
    }
}
